/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Entities;

import java.io.Serializable;
import javax.persistence.*;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author ADMIN
 */
@Entity
@Table(name = "tipofactura", catalog = "SIESCO", schema = "dbo")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Tipofactura.findAll", query = "SELECT t FROM Tipofactura t"),
    @NamedQuery(name = "Tipofactura.findByIdtipofactura", query = "SELECT t FROM Tipofactura t WHERE t.idtipofactura = :idtipofactura"),
    @NamedQuery(name = "Tipofactura.findByTipofactura", query = "SELECT t FROM Tipofactura t WHERE t.tipofactura = :tipofactura")})
public class Tipofactura implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    @Column(name = "idtipofactura", nullable = false)
    private Integer idtipofactura;
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 25)
    @Column(name = "tipofactura", nullable = false, length = 25)
    private String tipofactura;

    public Tipofactura() {
    }

    public Tipofactura(Integer idtipofactura) {
        this.idtipofactura = idtipofactura;
    }

    public Tipofactura(Integer idtipofactura, String tipofactura) {
        this.idtipofactura = idtipofactura;
        this.tipofactura = tipofactura;
    }

    public Integer getIdtipofactura() {
        return idtipofactura;
    }

    public void setIdtipofactura(Integer idtipofactura) {
        this.idtipofactura = idtipofactura;
    }

    public String getTipofactura() {
        return tipofactura;
    }

    public void setTipofactura(String tipofactura) {
        this.tipofactura = tipofactura;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idtipofactura != null ? idtipofactura.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Tipofactura)) {
            return false;
        }
        Tipofactura other = (Tipofactura) object;
        if ((this.idtipofactura == null && other.idtipofactura != null) || (this.idtipofactura != null && !this.idtipofactura.equals(other.idtipofactura))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "Entities.Tipofactura[ idtipofactura=" + idtipofactura + " ]";
    }
    
}
